package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type SystemRoleRequest struct {
	RoleName string `json:"role_name" form:"role_name"`

	RulesContent string `json:"rules_content" form:"rules_content"`

	Level string `json:"level" form:"level"`

	Status string `json:"status" form:"status"`
}

func (r *SystemRoleRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *SystemRoleRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"role_name": "required",

		"rules": "required",

		"level": "required",

		"status": "required",
	}
}

func (r *SystemRoleRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemRoleRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemRoleRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
